Square869120Contest 6 B - AtCoder Markets